<%-- 
    Document   : index
    Created on : 8 avr. 2012, 17:03:33
    Author     : Cranberry
--%>
<%@page language="java" session="true" %>
<%@page import="java.util.List"%>
<%@page import="bmg.Category"%>
<%@page import="bmg.Product"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<jsp:include page="inc/header.jsp">
    <jsp:param name="title" value="Product niania" />
</jsp:include>

<div class="ym-col1">
    
    <div class="ym-cbox">
        
        <div class="box info">
            <% Category current_category = (Category) request.getAttribute("current_category"); %>
            Vous parcourez actuellement la catégorie <strong><%= current_category.getName().getValue() %></strong><br /><br />
            <%= current_category.getDescription().getValue() %>
        </div>
        
        <% Product product = (Product) request.getAttribute("product"); %>
        
        <div class="ym-column">
            <div class="ym-col1">
                <div class="ym-cbox">
                    <h4><%= product.getName().getValue() %></h4>
                    <p><img src="/bmg/assets/img/temp.jpg"></p>
                </div>
            </div>
            <div class="ym-col3">
                <div class="ym-cbox">
                    <p class="center">Prix BMG TTC<br /><span style="color: red; font-weight: bold; font-size: 20px"><%= product.getPrice() %>€</span></p>
                    <form class="ym-form" method="POST" action="<% request.getContextPath(); %>?action=show_product&product_id=<%= product.getID() %>">
                        <div class="ym-fbox-text">
                            <label for="quantity" style="display: inline">Quantité souhaitée : </label><input style="width: 40px; display: inline" type="text" name="quantity" size="20" />
                        </div>
                    <span style="text-align: center; display: block">
                        <input type="submit" value="" id="add_to_cart" />
                    </span>
                    </form>
                </div>
            </div>
        </div>
                    
        <h3>Description du produit</h3>
        <p><%= product.getDescription().getValue() %></p>
        
    </div>    
        
</div>
        
<jsp:include page="menu.jsp" />      
        
<jsp:include page="inc/footer.jsp" />